'''

setStyle()
QstyleFactory()  当前平台支持的样式
QApplication.setStyle()  设置样式

'''
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
class AppWidget(QMainWindow):
    def __init__(self,parent=None):
        super(AppWidget,self).__init__(parent)
        Hlayout=QHBoxLayout()
        self.resize(400,400)
        self.setWindowFlags(Qt.FramelessWindowHint)#设置无边框
        #子窗口窗口无按钮有标题
        self.setWindowFlags(Qt.SubWindow)
        self.setObjectName("mainwindow")
        self.setStyleSheet("#mainwindow{border-image:url(panda.jpg);}")
        self.setWindowTitle("无边框窗口")

if __name__ == '__main__':
    app=QApplication(sys.argv)
    win=AppWidget()
    win.show()
    sys.exit(app.exec_())